package com.alm.token.ui.viewpagefragment;

import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.Gravity;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.alm.token.ConStant;
import com.alm.token.MyApp;
import com.alm.token.R;
import com.alm.token.base.BaseViewPageFragment;
import com.alm.token.ui.activity.BillActivity;
import com.alm.token.ui.activity.BlockWalletLoginActivity;
import com.alm.token.ui.activity.ExchangeQuotaActivity;
import com.alm.token.ui.activity.GroupActivity;
import com.alm.token.ui.activity.InviteFriendActivity;
import com.alm.token.ui.activity.MioExDetailActivity;
import com.alm.token.ui.activity.SetActivity;
import com.alm.token.ui.activity.ShouyiListActivity;
import com.alm.token.ui.activity.VipApplyActivity;
import com.alm.token.ui.data.bean.MyTeamData;
import com.alm.token.ui.data.bean.UserData;
import com.alm.token.ui.persenter.MyPreenter;
import com.alm.token.ui.view.MineView;
import com.alm.token.utils.CommonUtil;
import com.alm.token.utils.EmptyUtils;
import com.alm.token.utils.LogUtil;
import com.alm.token.utils.SpUtil;
import com.alm.token.utils.StringUtils;
import com.alm.token.widget.CustomFlagLayout;
import com.alm.token.widget.MQGlideImageLoader4;
import com.cryptape.cita_wallet.activity.AddWalletActivity;
import com.cryptape.cita_wallet.activity.FingerPrintActivity;
import com.cryptape.cita_wallet.activity.MainActivity;
import com.cryptape.cita_wallet.constant.ConstantUtil;
import com.cryptape.cita_wallet.util.db.SharePrefUtil;
import com.meiqia.core.MQManager;
import com.meiqia.core.bean.MQMessage;
import com.meiqia.core.callback.OnGetMessageListCallback;
import com.meiqia.core.callback.OnInitCallback;
import com.meiqia.meiqiasdk.imageloader.MQImage;
import com.meiqia.meiqiasdk.util.MQConfig;
import com.meiqia.meiqiasdk.util.MQIntentBuilder;

import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import baibeiwallet.event.RefreshMeEvent;
import butterknife.BindView;
import butterknife.OnClick;

import static com.cryptape.cita_wallet.activity.SplashActivity.LOCK_TO_MAIN;

public class MePageFrag extends BaseViewPageFragment implements MineView<UserData> {

    @BindView(R.id.vip)
    FrameLayout vip;
    @BindView(R.id.tv_vip)
    TextView tvVip;
    @BindView(R.id.group_item)
    RelativeLayout groupItem;
    @BindView(R.id.tv_group_item)
    TextView tvGroupItem;
    @BindView(R.id.block_wallet)
    LinearLayout blockWallet;
    @BindView(R.id.settop_item)
    ImageView settopItem;
    @BindView(R.id.img_useravatar)
    ImageView imgUseravatar;
    @BindView(R.id.tv_username)
    TextView tvUsername;
    @BindView(R.id.tv_userid)
    TextView tvUserid;
    @BindView(R.id.tv_viporderlevel)
    TextView tvViporderlevel;
    @BindView(R.id.tv_viporderstatus)
    TextView tvViporderstatus;
    @BindView(R.id.block_transactionwallet)
    LinearLayout blockTransactionwallet;
    @BindView(R.id.level_item)
    LinearLayout levelItem;
    @BindView(R.id.node_item)
    TextView nodeItem;
    @BindView(R.id.order_item)
    RelativeLayout orderItem;
    @BindView(R.id.encourage_item)
    RelativeLayout encourageItem;
    @BindView(R.id.feedback_item)
    RelativeLayout feedbackItem;
    @BindView(R.id.set_item)
    RelativeLayout setItem;
    @BindView(R.id.kefu_item)
    RelativeLayout kefuItem;
    @BindView(R.id.Safety_item)
    RelativeLayout SafetyItem;
    @BindView(R.id.shouyi_item)
    RelativeLayout shouyiItem;
    @BindView(R.id.stkshouyi_item)
    RelativeLayout stkshouyiItem;
    @BindView(R.id.mioexshouyi_item)
    RelativeLayout mioexshouyiItem;
    @BindView(R.id.bill_item)
    RelativeLayout billItem;
    @BindView(R.id.ly_userLabelbody)
    CustomFlagLayout lyUserLabelbody;
    @BindView(R.id.invitefriend_item)
    RelativeLayout invitefriendItem;
    @BindView(R.id.tv_userphone)
    TextView tvUserphone;

    @BindView(R.id.ly_xinjibody)
    LinearLayout lyXxinjiBody;
    @BindView(R.id.tv_tisheng)
    TextView tvTisheng;

    @BindView(R.id.zhonghou_item)
    LinearLayout zhonghouItem;
    @BindView(R.id.ly_zhongchoubody)
    LinearLayout lyZhongchouBody;
    @BindView(R.id.tv_zhongchou)
    TextView tvZhongchou;

    @BindView(R.id.eggpartern_item)
    LinearLayout eggparternItem;
    @BindView(R.id.ly_eggparternbody)
    LinearLayout lyEggparternBody;
    @BindView(R.id.tv_eggpartern)
    TextView tvEggpartern;

    @BindView(R.id.tv_kefulistnum)
    TextView tvKefulistnum;

//    @BindView(R.id.rl_mwallet)
//    RelativeLayout rl_mwallet;

    @BindView(R.id.btn_mwallet)
    TextView btn_mwallet;

    private UserData.DataBean.LevelBean level;
    private UserData.DataBean.VipOrderBean vipOrder;
    private UserData.DataBean.UserBean user;
    private static MeFragLisenter mFragLisenter;
    private int ll1 = 0;

    private MQManager mqManager;
    public static final int WALLET_LEHASBAO = 0, WALLET_QUKUAI = 1;

    public static MePageFrag newInstance(MeFragLisenter meFragLisenter) {
        MePageFrag fragment = new MePageFrag();
        Bundle args = new Bundle();
        fragment.setArguments(args);
        mFragLisenter = meFragLisenter;
        return fragment;
    }

    @Override
    protected MyPreenter initPreenter() {
        return new MyPreenter(this);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.viewpage_fragment_me;
    }

    @Override
    protected void initVariables() {


    }

    @Override
    protected void initViews(View view) {

    }

    @Override
    protected void loadData() {

    }

    @Override
    public void onResume() {
        super.onResume();
        preenter.getMineData();
        preenter.getMyTeamData();
        getUnreadMessages();
    }

    @Override
    public void onStart() {
        super.onStart();
        if (!EventBus.getDefault().isRegistered(this)) {
            EventBus.getDefault().register(this);
        }
    }

    @Subscribe(threadMode = ThreadMode.MAIN)
    public void onUserWalletEvent1(RefreshMeEvent refreshMeEvent) {
//        LogUtil.e("222---------------------");
        if (refreshMeEvent.index == 0) {
            getUnreadMessages();
        }
        if (refreshMeEvent.index == 1) {
            preenter.getMineData();
            preenter.getMyTeamData();
            getUnreadMessages();
        }
    }


    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.vip:
//                startActivity(VipApplyActivity.class);
                break;
            case R.id.group_item:
                startActivity(GroupActivity.class);
                break;
            case R.id.block_wallet:
//                startActivity(BlockWalletLoginActivity.class);
                break;
            case R.id.level_item:
//                if (ll1 == 0) {
//                    showToast("请点击应用-量化订单-量化交易-申请开启订单,即可提升");
//                } else {
//                    showToast("请点击应用-量化订单-点击进行中的订单追加数量,即可提升");
//                }
                break;
            case R.id.zhonghou_item:
//                if (ll1 == 0) {
//                    showToast("请点击应用-众筹-参与众筹,即可提升");
//                } else {
//                    showToast("请点击应用-众筹-参与众筹,即可提升");
//                }
                break;


        }
    }

    @Override
    public void jumpToLoginAct(int staue) {
        if (staue == 3) {
//            showToast(getString(R.string.common_relogin));
//            Intent intent = new Intent();
//            intent.setAction(ConStant.EXIT_APP);
//            getActivity().sendBroadcast(intent);
//            startActivity(BlockWalletLoginActivity.class);
//            getActivity().finish();
        } else if (staue == 4) {
//            showToast(getString(R.string.paypasw_hint_setpaypsw));
//            Intent intent = new Intent(getActivity(), PayPwdActivity.class);
//            intent.putExtra("PayPwdActivityType", PayPwdActivity.PAYPSW_SET);
//            startActivity(intent);
//            getActivity().finish();
            showToSetPaypswDialog();
        } else if (staue == 666) {
            showToUpdata();
        }
    }

    @Override
    public void getData(UserData userData) {
        if (userData.getStatus() == 0) {//获取到UserData
            MyApp.setUserData(userData);
            user = userData.getData().getUser();
            MyApp.setMail(EmptyUtils.isNotEmpty(user) ? user.getEmail() : "");
            level = userData.getData().getLevel();
            vipOrder = userData.getData().getVipOrder();

            if (EmptyUtils.isNotEmpty(userData.getData())) {
                UserData.DataBean data = userData.getData();
                boolean isPayPwd = data.isPayPwd();
                boolean bindEmail = data.isBindEmail();
                boolean bindMnemonic = data.isBindMnemonic();
                boolean bindGoogleCode = data.isBindGoogleCode();
                mFragLisenter.toBind(isPayPwd, bindEmail, bindMnemonic, bindGoogleCode);
            }

            EventBus.getDefault().post(new RefreshMeEvent(3));

            tvUsername.setText(user.getLoginname());
            tvUserid.setText("ID:" + user.getId());

            if (user.getEmail() != null) {
                String[] split = user.getEmail().split("@");
                tvUserphone.setText(split[0].length() > 4 ? split[0].substring(0, 1) + "****" + split[0].substring(split[0].length() - 2, split[0].length()) + "@" + split[1] : user.getEmail());
            } else {
                tvUserphone.setText(StringUtils.nullToStr(user.getEmail()));
            }

//            tvViporderlevel.setText("当前:" + level.getVipLevel() + "级" + level.getVipName() + "");
//            if (vipOrder == null) {
//                vip.setVisibility(View.GONE);
//                tvVip.setVisibility(View.GONE);
//                tvVip.setText(getString(R.string.mine_hint_becomevip));
//            } else if (vipOrder != null) {
////                if (vipOrder.getVipName().indexOf("超级会员") != -1) {//说明是超级会员
//                vip.setVisibility(View.GONE);
//                tvVip.setVisibility(View.GONE);
//                tvVip.setText(getString(R.string.mine_hint_vipdetail));
////                } else {
////                    vip.setVisibility(View.VISIBLE);
////                    tvVip.setText("成为超级VIP");
////                }
//            }
            lyUserLabelbody.removeAllViews();
            if (EmptyUtils.isNotEmpty(level) && EmptyUtils.isNotEmpty(level.getUserLabel())) {
                Map<String, String> userLabel = level.getUserLabel();

                for (String key : userLabel.keySet()) {
                    TextView textView = new TextView(getActivity());
                    textView.setText("   " + key + "   ");
                    textView.setTextSize(CommonUtil.dip2px(getActivity(), 5));
                    LinearLayout.LayoutParams textParamsRoot = new LinearLayout.LayoutParams(
                            LinearLayout.LayoutParams.WRAP_CONTENT,
                            LinearLayout.LayoutParams.WRAP_CONTENT);
//                    textParamsRoot.height = CommonUtil.dip2px(getActivity(), 30);
                    textParamsRoot.gravity = Gravity.CENTER;
                    textView.setLayoutParams(textParamsRoot);
                    textView.setGravity(Gravity.CENTER);
                    int padding = CommonUtil.dip2px(getActivity(), 5);
                    textView.setPadding(0, padding, 0, padding);
                    GradientDrawable drawable = (GradientDrawable) getActivity().getResources().getDrawable(R.drawable.shape_me_userflag);
                    drawable.setColor(Color.parseColor(userLabel.get(key)));
                    textView.setBackgroundDrawable(drawable);
                    lyUserLabelbody.addView(textView);
                }


            } else {
                LogUtil.e("2222");
            }


            ll1 = level.getMaxLevel();
            if (ll1 <= lyXxinjiBody.getChildCount()) {
                for (int i = 0; i < lyXxinjiBody.getChildCount(); i++) {//4number  i=0-3
                    if (i < ll1) { //i=0 1 2 3  ll1=1 2 3 4
                        lyXxinjiBody.getChildAt(i).setVisibility(View.VISIBLE);
                    } else {
                        lyXxinjiBody.getChildAt(i).setVisibility(View.GONE);
                    }
                }
            }
            if (ll1 == 0) {
                tvTisheng.setVisibility(View.VISIBLE);
                tvTisheng.setText(getString(R.string.mine_hint_empty));
                levelItem.setOnClickListener(null);
            } else {
                tvTisheng.setVisibility(View.GONE);
                levelItem.setOnClickListener(null);
            }

            ll1 = 0;
            if (EmptyUtils.isNotEmpty(userData.getData().getEggPartner())) {
                ll1 = userData.getData().getEggPartner().getGoodsId();
            }
            if (ll1 <= lyEggparternBody.getChildCount()) {//0-4 4
                for (int i = 0; i < lyEggparternBody.getChildCount(); i++) {//i=0-3
                    if (i < ll1) { //i=0 1 2 3  ll1=0 1 2 3 4
                        lyEggparternBody.getChildAt(i).setVisibility(View.VISIBLE);
                    } else {
                        lyEggparternBody.getChildAt(i).setVisibility(View.GONE);
                    }
                }
            }
            if (ll1 == 0) {
                tvEggpartern.setVisibility(View.VISIBLE);
                tvEggpartern.setText(getString(R.string.mine_hint_empty));
                eggparternItem.setOnClickListener(null);
            } else {
                tvEggpartern.setVisibility(View.GONE);
                eggparternItem.setOnClickListener(null);
            }


//            if (ll1 == 4) {
//                tvTisheng.setVisibility(View.GONE);
//                levelItem.setOnClickListener(null);
//            } else {
//                tvTisheng.setVisibility(View.VISIBLE);
//                levelItem.setOnClickListener(this);
//            }


            ll1 = level.getCfdLevel();
            if (ll1 <= lyZhongchouBody.getChildCount()) {
                for (int i = 0; i < lyZhongchouBody.getChildCount(); i++) {//4number  i=0-3
                    if (i < ll1) { //i=0 1 2 3  ll1=1 2 3 4
                        lyZhongchouBody.getChildAt(i).setVisibility(View.VISIBLE);
                    } else {
                        lyZhongchouBody.getChildAt(i).setVisibility(View.GONE);
                    }
                }
            }
            if (ll1 == 0) {
                tvZhongchou.setVisibility(View.VISIBLE);
                tvZhongchou.setText(getString(R.string.mine_hint_empty));
                zhonghouItem.setOnClickListener(null);
            } else {
                tvZhongchou.setVisibility(View.GONE);
                zhonghouItem.setOnClickListener(null);
            }

//            if (ll1 == 4) {
//                tvZhongchou.setVisibility(View.GONE);
//                zhonghouItem.setOnClickListener(null);
//            } else {
//                tvZhongchou.setVisibility(View.VISIBLE);
//                zhonghouItem.setOnClickListener(this);
//            }


//            @BindView(R.id.vip)
//            FrameLayout vip;
//            @BindView(R.id.tv_vip)
//            TextView tvVip;
//            tvViporderstatus.setText();//根据会员状态字段 判断是否生效失效
//            Glide.with(this).load(user.getHeadurl()).into(imgUseravatar);

        }
//        showToast(userData.getMsg());
    }

    @Override
    public void getMyTeamData(MyTeamData myTeamData) {
        if (myTeamData.getStatus() == 0 && myTeamData.getData() != null) {
            MyApp.setMyTeamDataBean(myTeamData.getData());
            MyTeamData.DataBean dataBean = myTeamData.getData();
            tvGroupItem.setText(dataBean.getNum() + "");
            MyTeamData.DataBean.LevelBean levelBean = dataBean.getLevel();
            if (levelBean != null) {
                nodeItem.setText(TextUtils.isEmpty(levelBean.getNodeName()) ? getString(R.string.mine_hint_empty)
                        : levelBean.getNodeName().equalsIgnoreCase(getString(R.string.mine_hint_empty1)) ? getString(R.string.mine_hint_empty) : levelBean.getNodeName());
            }
        }
    }

    @Override
    public void onError(String error) {

    }

    @Override
    public void ShowProgress() {

    }

    @Override
    public void hideProgress() {

    }

    @OnClick({R.id.settop_item, R.id.img_useravatar, R.id.vip, R.id.block_transactionwallet, R.id.block_wallet
            , R.id.node_item, R.id.order_item, R.id.group_item, R.id.encourage_item, R.id.bill_item,
            R.id.feedback_item, R.id.set_item,
            R.id.minequota_item,R.id.kefu_item,
            R.id.shouyi_item, R.id.stkshouyi_item,
            R.id.mioexshouyi_item, R.id.invitefriend_item, R.id.Safety_item,
            R.id.btn_mwallet
    })
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.img_useravatar:
//                showToast("头像click");
                break;
            case R.id.vip:
//                showToast(getString(R.string.mine_hint_vipwarn));
                startActivity(VipApplyActivity.class);
//                startActivity(VipApplySplashActivity.class);

                break;
            case R.id.minequota_item:
                startActivity(ExchangeQuotaActivity.class);
                break;
            case R.id.block_transactionwallet:
//                showToast("交易钱包click");
                mFragLisenter.meFragToWalletFrag(WALLET_LEHASBAO);
                break;
            case R.id.block_wallet:
//                showToast("区块链钱包click");
                mFragLisenter.meFragToWalletFrag(WALLET_QUKUAI);
//                startActivity(BlockWalletLoginActivity.class);
                break;
            case R.id.invitefriend_item:
//                showToast("设置click");
                startActivity(InviteFriendActivity.class);
                break;
            case R.id.node_item:
                if (nodeItem.getText().toString().equalsIgnoreCase(getString(R.string.mine_hint_upnode))) {
                    showToast(getString(R.string.mine_hint_upnode1));
                }
                break;
            case R.id.order_item:
//                showToast("我的订单click");
                break;
            case R.id.group_item:
                if (MyApp.getMyTeamDataBean() == null) {
                    preenter.getMyTeamData();
                    showToast(getString(R.string.common_loading));
                    break;
                }
                startActivity(GroupActivity.class);
                break;
            case R.id.encourage_item:
//                showToast("激励click");
                break;
            case R.id.feedback_item:
//                showToast("反馈click");
                break;
            case R.id.settop_item:
            case R.id.set_item:
//                showToast("设置click");
                startActivity(SetActivity.class);
                break;

            case R.id.kefu_item:
//                showToast("客服click");
                if (user == null) {
                    preenter.getMineData();
                    showToast(getString(R.string.common_loading));
                    break;
                }
                initMeiqia();
                break;
            case R.id.shouyi_item:
                Intent intent = new Intent(getActivity(), ShouyiListActivity.class);
                intent.putExtra("type", ShouyiListActivity.SHOUYITYPE_AGO);
                startActivity(intent);
                break;
            case R.id.stkshouyi_item:
                Intent intent1 = new Intent(getActivity(), ShouyiListActivity.class);
                intent1.putExtra("type", ShouyiListActivity.SHOUYITYPE_STK);
                startActivity(intent1);
                break;

            case R.id.mioexshouyi_item:
                Intent intent2 = new Intent(getContext(), MioExDetailActivity.class);
                startActivity(intent2);
                break;
            case R.id.bill_item:
                startActivity(BillActivity.class);
                break;
            case R.id.Safety_item:
                Intent mintent = new Intent(getActivity(), SetActivity.class);
                mintent.putExtra("SetActivity_type", 1);
                startActivity(mintent);
                break;
            case R.id.btn_mwallet:
                gotoMainPage();
                break;
        }
    }


    private void gotoMainPage() {
        if (!TextUtils.isEmpty(SharePrefUtil.getCurrentWalletName())) {
            if (SharePrefUtil.getBoolean(ConstantUtil.FINGERPRINT, false)) {
                Intent intent = new Intent(getContext(), FingerPrintActivity.class);
                intent.putExtra(LOCK_TO_MAIN, true);
                startActivity(intent);
            } else {
                startActivity(new Intent(getContext(), MainActivity.class));
            }
        } else {
            Intent intent = new Intent(getContext(), AddWalletActivity.class);
            startActivity(intent);
        }
    }


    private void initMeiqia() {
        MQConfig.isShowClientAvatar = true;
        MQConfig.ui.titleBackgroundResId = R.color.text_99b71269;
        MQConfig.ui.titleTextColorResId = R.color.white;
        MQConfig.ui.backArrowIconResId = R.drawable.arrow_left;
        MQConfig.init(getActivity(), "59699b908f25aaed455f66aef1f92ab2", new OnInitCallback() {
            @Override
            public void onSuccess(String clientId) {
//                Toast.makeText(getActivity(), "init success", Toast.LENGTH_SHORT).show();
                //2.启动对话界面
                LogUtil.e("clientId=" + clientId);
                MQImage.setImageLoader(new MQGlideImageLoader4());

                HashMap<String, String> clientInfo = new HashMap<>();
                clientInfo.put("name", user.getLoginname());
                clientInfo.put("avatar", "" + Uri.parse("android.resource://" + MyApp.getsInstance().getPackageName() + "/" + R.drawable.icon_meiqiankefu1));
//                clientInfo.put("gender", "男");
                clientInfo.put("tel", user.getPhone());
//                clientInfo.put("技能1", "休刊");

//                HashMap<String, String> updateInfo = new HashMap<>();
//                updateInfo=clientInfo;

                Intent intent = new MQIntentBuilder(getActivity())
                        .setCustomizedId(SpUtil.getString(MyApp.context, ConStant.MEIQIAID, ""))
                        .setClientInfo(clientInfo) // 设置顾客信息 PS: 这个接口只会生效一次,如果需要更新顾客信息,需要调用更新接口
//                        .updateClientInfo(updateInfo) // 更新顾客信息 PS: 如果客服在工作台更改了顾客信息，更新接口会覆盖之前的内容
                        .build();
                startActivity(intent);


                /**
                 * 3.启动留言表单界面  startActivity(new Intent(this, MQMessageFormActivity.class));
                 目前是两种模式：
                 (1) 完全对话模式
                 无机器人时：如果当前客服不在线，直接聊天界面输入就是留言，客服上线后能够直接回复，如果客服在线，则进入正常客服对话模式。
                 有机器人时：如果当前客服不在线时，直接聊天界面输入的话，还是由机器人回答，顾客点击留言就会跳转到表单。
                 (2) 单一表单模式
                 不管客服是否在线都会进入表单，顾客提交后，不会有聊天的界面。这种主要用于一些 App 只需要用户反馈，不需要直接回复的形式。
                 */
//                startActivity(new Intent(getActivity(), MQMessageFormActivity.class));
            }

            @Override
            public void onFailure(int code, String message) {
//                Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
            }
        });

        /**
         * 获取当前 Client 的未读消息
         *
         * @param onGetMessageListCallback 回调
         */
        mqManager = MQManager.getInstance(getActivity());
    }

    public void getUnreadMessages() {
        if (mqManager != null)
            mqManager.getUnreadMessages(new OnGetMessageListCallback() {
                @Override
                public void onSuccess(List<MQMessage> list) {
//                    Toast.makeText(getActivity(), "getUnreadMessages success", Toast.LENGTH_SHORT).show();
                    if (tvKefulistnum != null) {
                        tvKefulistnum.setVisibility(list.size() == 0 ? View.GONE : View.VISIBLE);
                        tvKefulistnum.setText(list.size() == 0 ? "" : list.size() + "");
                    }

                }

                @Override
                public void onFailure(int i, String s) {
//                    Toast.makeText(getActivity(), s, Toast.LENGTH_SHORT).show();
                    if (tvKefulistnum != null)
                        tvKefulistnum.setVisibility(View.GONE);
                }
            });
    }

    public interface MeFragLisenter {
        void meFragToWalletFrag(int walletType);
        void toBind(boolean isPayPwd, boolean bindEmail, boolean bindMnemonic, boolean bindGoogleCode);
    }
}
